//
//  NSDictionary+protect.m
//  news_ios_app
//
//  Created by apple on 16/3/19.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "NSDictionary+protect.h"

@implementation NSDictionary (protect)

- (instancetype)stringForKey:(id)aKey
{
    if (![self isKindOfClass:[NSDictionary class]]) {
        return nil;
    }
    if ([self isEqual:[NSNull null]] || [self isEqual:nil] || [aKey isEqual:nil]) {
        return nil;
    }
    
    return [self objectForKey:aKey];
}

@end
